var codecopypng='<svg class="icon" viewBox="0 0 1024 1024" width="200" height="200"><path d="M832 738.56V320a128 128 0 0 0-128-128H128a128 128 0 0 0-128 128v576a128 128 0 0 0 128 128h576a128 128 0 0 0 128-128v-157.44z m-92.8 128a64 64 0 0 1-64 64H156.16a64 64 0 0 1-64-64V349.44a64 64 0 0 1 64-64h517.76a64 64 0 0 1 64 64v390.4z" p-id="1849" fill="#707070"></path><path d="M1024 704a128 128 0 0 1-128 128h-64v-93.44h36.48a64 64 0 0 0 64-64V156.8a64 64 0 0 0-64-64H349.44a64 64 0 0 0-64 64V192H192V128a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128z" p-id="1850" fill="#707070"></path><path d="M221.44 448m48 0l288 0q48 0 48 48l0 0q0 48-48 48l-288 0q-48 0-48-48l0 0q0-48 48-48Z" p-id="1851" fill="#707070"></path><path d="M221.44 672m48 0l288 0q48 0 48 48l0 0q0 48-48 48l-288 0q-48 0-48-48l0 0q0-48 48-48Z" p-id="1852" fill="#707070"></path></svg>';
window.onload=function(){codecopy_load()};
function codecopy_load()
{
	var codes=document.getElementsByTagName("pre");
	for(let i=codes.length-1;i>=0;i--)
	{
		var copy=document.createElement("div");
		copy.innerHTML=codecopypng;
		copy.className="codecopy";
		copy.onclick=function(){
			codecopy(i);
		}
		copy.code=i;
		codes[i].insertBefore(copy,codes[i].firstChild);
		codecopy_yc(copy,codes[i]);
	}
}
function codecopy(id)
{
	var COPY=document.createElement("textarea");
	document.body.appendChild(COPY);
	COPY.value=document.getElementsByTagName("pre")[id].innerText.replace("copy\n","");
	COPY.select();
	document.execCommand("copy");
	COPY.remove();
	spop({
		template:"复制成功!",
		style:"success",
		autoclose:2000
	});
}
function codecopy_yc(obj,f)
{
	obj.style.display="none";
	f.onmouseover=function(){
		obj.style.display="";
	};
	f.onmouseout=function(){
		obj.style.display="none";
	};
}